//
//  YSDownLoadManager.h
//  YSDownLoader_Example
//
//  Created by Kyson on 2018/12/4.
//  Copyright © 2018 kysonyangs. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "YSDownLoader.h"

@interface YSDownLoadManager : NSObject

// 单例
+ (instancetype)shareInstance;

// 根据URL下载资源
// 监听下载信息, 成功, 失败回调
- (void)downLoadWithURL:(NSURL *)url downLoadInfo:(DownLoadInfoType)downLoadBlock progress:(ProgressBlockType)progressBlock success:(SuccessBlockType)successBlock failed:(FailedBlockType)failBlock;

// 根据URL暂停资源
- (void)pauseWithURL:(NSURL *)url;
- (void)resumeWithURL:(NSURL *)url;
- (void)cancelWithURL:(NSURL *)url;

// 暂停所有
- (void)pauseAll;

// 恢复所有
- (void)resumeAll;

@end
